# Clear
rm(list = ls())

# Working Directory
getwd()
list.files()
setwd("/Users/claywebb/Dropbox/KU/Research/Sanctions/Power Politics or Public Pandering/IIRR")

## Load Dataset
sanctions <- ts(read.csv("sanc_rep_data.csv"), start = c(1978,1), end = c(2005,12), frequency = 12) 

################
###          ###
### Figure 1 ###
###          ###
################

## Load MSBVAR Package
library(MSBVAR)

## New Plot Function
new_plot <- function (x, method = method, component = component, probs = probs, 
                      varnames = varnames, modname = NULL, ...){
  m <- sqrt(dim(x)[3])
  nsteps <- dim(x)[2]
  draws <- dim(x)[1]
  irf.ci <- array(0, c(nsteps, length(probs) + 1, m^2))
  if (method == "Percentile") {
    eigen.sum <- 0
    for (i in 1:m^2) {
      irf.bands <- t(apply(x[, , i], 2, quantile, probs))
      irf.mean <- apply(x[, , i], 2, mean)
      irf.ci[, , i] <- cbind(irf.bands, irf.mean)
    }
  }
  if (method == "Normal Approximation") {
    eigen.sum <- 0
    for (i in 1:m^2) {
      irf.mean <- apply(x[, , i], 2, mean)
      irf.var <- apply(x[, , i], 2, var)
      irf.bands <- irf.mean + matrix(rep(qnorm(probs), 
                                         each = nsteps), nrow = nsteps) * irf.var
      irf.ci[, , i] <- cbind(irf.bands, irf.mean)
    }
  }
  if (method == "Sims-Zha1") {
    eigen.sum <- matrix(0, m^2, nsteps)
    for (i in 1:m^2) {
      decomp <- eigen(var(x[, , i]), symmetric = T)
      W <- decomp$vectors
      lambda <- decomp$values
      irf.mean <- apply(x[, , i], 2, mean)
      irf.bands <- irf.mean + W[, component] * matrix(rep(qnorm(probs), 
                                                          each = nsteps), nrow = nsteps) * sqrt(lambda[component])
      irf.ci[, , i] <- cbind(irf.bands, irf.mean)
      eigen.sum[i, ] <- 100 * lambda/sum(lambda)
    }
  }
  if (method == "Sims-Zha2") {
    eigen.sum <- matrix(0, m^2, nsteps)
    for (i in 1:m^2) {
      decomp <- eigen(var(x[, , i]), symmetric = T)
      W <- decomp$vectors
      lambda <- decomp$values
      gammak <- x[, , i] * (W[component, ])
      gammak.quantiles <- t(apply(gammak, 2, quantile, 
                                  probs = probs))
      irf.mean <- apply(x[, , i], 2, mean)
      irf.bands <- irf.mean + gammak.quantiles
      irf.ci[, , i] <- cbind(irf.bands, irf.mean)
      eigen.sum[i, ] <- 100 * lambda/sum(lambda)
    }
  }
  if (method == "Sims-Zha3") {
    eigen.sum <- matrix(0, m^2, m^2 * nsteps)
    stacked.irf <- array(x, c(draws, m^2 * nsteps))
    decomp <- eigen(var(stacked.irf), symmetric = T)
    W <- decomp$vectors
    lambda <- decomp$values
    gammak <- stacked.irf * W[component, ]
    gammak.quantiles <- apply(gammak, 2, quantile, probs)
    irf.mean <- matrix(apply(stacked.irf, 2, mean), nrow = length(probs), 
                       ncol = dim(stacked.irf)[2], byrow = T)
    irf.bands <- irf.mean + gammak.quantiles
    irf.ci <- array((rbind(irf.bands, irf.mean[1, ])), c(length(probs) + 
                                                           1, nsteps, m^2))
    irf.ci <- aperm(irf.ci, c(2, 1, 3))
    eigen.sum <- 100 * lambda/sum(lambda)
  }
  
  
  minmax <- matrix(0, nrow = m, ncol = 2)
  within.plots <- apply(irf.ci, 3, range)
  tmp <- (c(1:m^2)%%m)
  tmp[tmp == 0] <- m
  indices <- sort(tmp, index.return = T)$ix
  dim(indices) <- c(m, m)
  
  #bottom_row <- c(indices[nrow(indices),])
  
  bottom_row_val <- m^2 - m
  
  for (i in 1:m) {
    minmax[i, ] <- range(within.plots[, indices[, i]])
  }
  
  my_max <- matrix(0, nrow = m^2, ncol = 2)
  
  for (i in 1:m^2){
    
    p_max <- max(abs(within.plots[,i]))  
    p_min <- (0 - p_max)
    my_max[i,] <- c(p_min, p_max)
    
  }
  
  j <- 1
  par(mfcol = c(m, m), mai = c(0.15, 0.2, 0.15, 0.15), omi = c(0.15, 
                                                               0.75, 1, 0.15))
  
  for (i in 1:m^2) {
    
    
    lims <- ifelse((i - m)%%m == 0, m, (i - m)%%m)
    ts.plot(irf.ci[, , i], gpars = list(xlab = "", ylab = "", 
                                        ylim = minmax[lims, ]),lwd=2)
    abline(h = 0, lwd =3, col="gray")
    
    #if (indices[i] <= bottom_row_val) { 
    
    # ts.plot(irf.ci[, , i], gpars = list(xlab = "", ylab = "", ylim = my_max[i, ], xaxt = 'n',lwd = 2))
    #  abline(h = 0, lwd = 2, lty = 2, col = "gray")
    
    #} else {
    
    # ts.plot(irf.ci[, , i], gpars = list(xlab = "", ylab = "", 
    #   ylim = my_max[i, ]),lwd=2)
    #  abline(h = 0, lwd = 2, lty = 2, col = "gray")
    
    #}                               
    
    if (i <= m) {
      mtext(varnames[i], side = 2, line = 3)
    }
    if ((i - 1)%%m == 0) {
      mtext(varnames[j], side = 3, line = 2)
      j <- j + 1
    }
  }
  
  
  
  
  #mtext(paste0(modname), side = 3, line = 6, outer = T)
  mtext("Response in", side = 2, line = 4, outer = T)
  mtext("Shock to", side = 3, line = 4, outer = T)
  if (method == "Sims-Zha1" | method == "Sims-Zha2") {
    if (is.null(varnames) == T) 
      varnames <- paste("V", seq(1:m), sep = "")
    shock.name <- rep(varnames, m)
    response.name <- rep(varnames, each = m)
    eigen.sum <- cbind(shock.name, response.name, as.data.frame(eigen.sum))
    colnames(eigen.sum) <- c("Shock", "Response", paste("Component", 
                                                        seq(1:nsteps)))
  }
  if (method == "Sims-Zha3") {
    names(eigen.sum) <- c(paste("Component", seq(1:m^2 * 
                                                   nsteps)))
  }
  return(list(responses = irf.ci, eigenvector.fractions = eigen.sum))
}

## Create Endogenous Variables Object
VAR_SER <- sanctions[,c("sanc","approval","unem1","dt_inflation","umics")]

## Create Exogenous Variables Object
z1 <- ts(as.matrix(cbind(sanctions[,"elecyear"], sanctions[,"inauguration"], sanctions[,"reagan"], sanctions[,"bush1"], sanctions[,"clinton"],
                         sanctions[,"bush2"], sanctions[,"iranhostage"], sanctions[,"reaganshot"], sanctions[,"grenada"], sanctions[,"libyabomb"],
                         sanctions[,"irancontra"], sanctions[,"panamainvade"], sanctions[,"budgetsummit"], sanctions[,"persiangulf"], sanctions[,"somalia"],
                         sanctions[,"haitiinvade"], sanctions[,"lewinsky"], sanctions[,"kosovoinvade"], sanctions[,"iraqifreedom"], sanctions[,"chinaspyplane"],
                         sanctions[,"afghanwar"], sanctions[,"sep11"],  sanctions[,"iraqinvade"], sanctions[,"unscom"])), start = c(1978,1), end = c(2005,12), frequency = 12) 

## Set Lag Length 
p <- 2

## Set Hyperparameters
lambda0 <- 0.5
lambda1 <- 0.1
lambda3 <- 2
lambda4 <- 0.5
lambda5 <- 0.05
mu5 <- 1
mu6 <- 0
qm <- 12

## Set Restriction Matrix
m <- ncol(VAR_SER)

sanc_app_e.A0 <- diag(m)
sanc_app_e.A0
sanc_app_e.A0[c(2),1] <- 1
sanc_app_e.A0[c(1),2] <- 1
sanc_app_e.A0[c(1,2,5),3] <- 1
sanc_app_e.A0[c(1,2,5),4] <- 1
sanc_app_e.A0[c(1,2),5] <- 1
sanc_app_e.A0
colnames(sanc_app_e.A0) <- colnames(VAR_SER)
rownames(sanc_app_e.A0) <- colnames(VAR_SER)
sanc_app_e.A0

## Seed
set.seed(121212)

## Estimate Sructural VAR
sanc_app_e_mod <- szbsvar(Y = VAR_SER, z = z1,
                          p = p, lambda0 = lambda0, lambda1 = lambda1, lambda3 = lambda3,  lambda4 = lambda4, lambda5 = lambda5,  
                          mu5 = mu5, mu6 = mu6, qm = qm, ident = sanc_app_e.A0)

## Gibbs Sampler

### Burnin
N1 <- 100000

### Gibbs Draws
N2 <- 300000

### Thin Integer
thin <- 2

### Sample
gibbs_out <- gibbs.A0(varobj=sanc_app_e_mod , N1=N1, N2=N2, thin=thin, normalization="DistanceMLA")

## Impulse Response Functions

### Variable Names
my_varnames <- c("Sanctions", "Approval", "Unemployment", "Inflation", "UMICS")

### IRFs

impulse_sample_sanc_app_e <- mc.irf(sanc_app_e_mod, 6, draws = 1000, A0.posterior= gibbs_out ,sign.list = c(1,1,1,1,1))

### Produce Plot
a_plot_95_sanc_app_e <- new_plot(impulse_sample_sanc_app_e,  method = "Sims-Zha2",  component = 1,  probs = c(0.025,0.975), varnames = my_varnames) 

### Convergence
library(coda)
A0.out <- A02mcmc(gibbs_out)
geweke <- coda::geweke.diag(A0.out)
geweke

###############
###         ###
### Table 1 ###
###         ###
###############

# Models

## Approval
app_mod <- dynlm::dynlm(approval ~ L(approval, 1) +
                          unem1 +
                          inflation + 
                          umics + 
                          elecyear +
                          inauguration +
                          reagan + 
                          bush1 +
                          clinton + 
                          bush2 +
                          lewinsky +
                          irancontra +
                          reaganshot +
                          budgetsummit +
                          sep11 +
                          iranhostage +
                          libyabomb +
                          chinaspyplane +
                          afghanwar +
                          grenada +
                          haitiinvade +
                          iraqinvade +
                          persiangulf +
                          iraqifreedom +
                          unscom +
                          kosovoinvade +
                          panamainvade +
                          somalia,
                          data = sanctions)
summary(app_mod)
astsa::acf2(summary(app_mod)$residuals)
Box.test(summary(app_mod)$residuals,48,"Ljung")
AIC(app_mod)
BIC(app_mod)

## Sanctions
sanc_mod <- dynlm::dynlm(approval ~ L(approval, 1) +
                           sanc + 
                           L(sanc,4) + 
                           unem1 +
                           inflation + 
                           umics + 
                           elecyear +
                           inauguration +
                           reagan + 
                           bush1 +
                           clinton + 
                           bush2 +
                           lewinsky +
                           irancontra +
                           reaganshot +
                           budgetsummit +
                           sep11 +
                           iranhostage +
                           libyabomb +
                           chinaspyplane +
                           afghanwar +
                           grenada +
                           haitiinvade +
                           iraqinvade +
                           persiangulf +
                           iraqifreedom +
                           unscom +
                           kosovoinvade +
                           panamainvade +
                           somalia,
                           data = sanctions)
summary(sanc_mod)
astsa::acf2(summary(sanc_mod)$residuals)
Box.test(summary(sanc_mod)$residuals,48,"Ljung")
AIC(sanc_mod)
BIC(sanc_mod)

# Low Politics
lp_mod <- dynlm::dynlm(approval ~ L(approval, 1) +
                         lp + 
                         L(lp,4) + 
                         unem1 +
                         inflation + 
                         umics + 
                         elecyear +
                         inauguration +
                         reagan + 
                         bush1 +
                         clinton + 
                         bush2 +
                         lewinsky +
                         irancontra +
                         reaganshot +
                         budgetsummit +
                         sep11 +
                         iranhostage +
                         libyabomb +
                         chinaspyplane +
                         afghanwar +
                         grenada +
                         haitiinvade +
                         iraqinvade +
                         persiangulf +
                         iraqifreedom +
                         unscom +
                         kosovoinvade +
                         panamainvade +
                         somalia,
                         data = sanctions)
summary(lp_mod)
astsa::acf2(summary(lp_mod)$residuals)
Box.test(summary(lp_mod)$residuals,48,"Ljung")
AIC(lp_mod)
BIC(lp_mod)

# High Politics
hp_mod <- dynlm::dynlm(approval ~ L(approval, 1) +
                         hp + 
                         L(hp,4) + 
                         unem1 +
                         inflation + 
                         umics + 
                         elecyear +
                         inauguration +
                         reagan + 
                         bush1 +
                         clinton + 
                         bush2 +
                         lewinsky +
                         irancontra +
                         reaganshot +
                         budgetsummit +
                         sep11 +
                         iranhostage +
                         libyabomb +
                         chinaspyplane +
                         afghanwar +
                         grenada +
                         haitiinvade +
                         iraqinvade +
                         persiangulf +
                         iraqifreedom +
                         unscom +
                         kosovoinvade +
                         panamainvade +
                         somalia,
                         data = sanctions)
summary(hp_mod)
astsa::acf2(summary(hp_mod)$residuals)
Box.test(summary(hp_mod)$residuals,48,"Ljung")
AIC(hp_mod)
BIC(hp_mod)

# Aggregate Output

## Top Panel
a_s <- summary(app_mod)
s_s <- summary(sanc_mod)
l_s <- summary(lp_mod)
h_s <-summary(hp_mod)

col_1 <- round(c(a_s$coefficients[2,1],
                 NA,
                 NA,
                 NA,
                 NA,
                 NA,
                 NA,
                 a_s$coefficients[3:length(a_s$coefficients[,1]),1],
                 a_s$coefficients[1,1]),2)

col_2 <- round(c(a_s$coefficients[2,2],
                 NA,
                 NA,
                 NA,
                 NA,
                 NA,
                 NA,
                 a_s$coefficients[3:length(a_s$coefficients[,2]),2],
                 a_s$coefficients[1,2]),2)

col_3 <- round(c(s_s$coefficients[2,1],
                 s_s$coefficients[3,1],
                 s_s$coefficients[4,1],
                 NA,
                 NA,
                 NA,
                 NA,
                 s_s$coefficients[5:length(s_s$coefficients[,1]),1],
                 s_s$coefficients[1,1]),2)

col_4 <- round(c(s_s$coefficients[2,2],
                 s_s$coefficients[3,2],
                 s_s$coefficients[4,2],
                 NA,
                 NA,
                 NA,
                 NA,
                 s_s$coefficients[5:length(s_s$coefficients[,2]),2],
                 s_s$coefficients[1,2]),2)

col_5 <- round(c(l_s$coefficients[2,1],
                 NA,
                 NA,
                 l_s$coefficients[3,1],
                 l_s$coefficients[4,1],
                 NA,
                 NA,
                 l_s$coefficients[5:length(l_s$coefficients[,1]),1],
                 l_s$coefficients[1,1]),2)

col_6 <- round(c(l_s$coefficients[2,2],
                 NA,
                 NA,
                 l_s$coefficients[3,2],
                 l_s$coefficients[4,2],
                 NA,
                 NA,
                 l_s$coefficients[5:length(l_s$coefficients[,2]),2],
                 l_s$coefficients[1,2]),2)

col_7 <- round(c(h_s$coefficients[2,1],
                 NA,
                 NA,
                 NA,
                 NA,
                 h_s$coefficients[3,1],
                 h_s$coefficients[4,1],
                 h_s$coefficients[5:length(h_s$coefficients[,1]),1],
                 h_s$coefficients[1,1]),2)

col_8 <- round(c(h_s$coefficients[2,2],
                 NA,
                 NA,
                 NA,
                 NA,
                 h_s$coefficients[3,2],
                 h_s$coefficients[4,2],
                 h_s$coefficients[5:length(h_s$coefficients[,2]),2],
                 h_s$coefficients[1,2]),2)


pan_1 <- cbind(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8)

x <- col_1
se_x <- col_2

## Function to create stars
star_func <- function(x,se_x){
  
  star_col <- vector(,length = length(x))
  
  cols <- cbind(x,se_x)
  
  for (i in 1:nrow(cols)){
    
    if (is.na(cols[i,1])){
      
      star_col[i] <- "NA"
      
    } else {
      
      t_rat <- (cols[i,1]/cols[i,2])
      
      if (abs(t_rat) >= 2.58){
        
        star_col[i] <-paste0(x[i],"***")
        
      }
      
      if (abs(t_rat) >= 1.96 & abs(t_rat) < 2.58 ){
        
        star_col[i] <-  paste0(x[i],"**")  
        
      }
      
      if (abs(t_rat) >= 1.68 & abs(t_rat) < 1.96 ){
        
        star_col[i] <- paste0(x[i],"*")
        
      }
      
      if (abs(t_rat) < 1.68 ){
        
        star_col[i] <- x[i]
        
      }
      
    }
    
  }  
  star_col
  
}

s_col_1 <- star_func(col_1,col_2)
s_col_3 <- star_func(col_3,col_4)
s_col_5 <- star_func(col_5,col_6)
s_col_7 <- star_func(col_7,col_8)

## Function to create ()
par_func <- function(x){
  
  new_col <- vector(,length = length(x))
  
  for (i in 1:length(x)){
    new_col[i] <- paste0("(",x[i],")")
  }
  
  new_col
}

p_col_2 <- par_func(col_2)
p_col_4 <- par_func(col_4)
p_col_6 <- par_func(col_6)
p_col_8 <- par_func(col_8)

pan_1 <- cbind(s_col_1,p_col_2,s_col_3,p_col_4,s_col_5,p_col_6,s_col_7,p_col_8)
pan_1

rownames(pan_1) <- c("Approval_{t - 1}",
                     "Sanctions_{t}",
                     "Sanctions_{t - 4}",
                     "Low Politics_{t}",
                     "Low Politics_{t - 4}",
                     "High Politics_{t}",
                     "High Politics_{t - 4}",
                      "Unemployment",
                     "Inflation",
                     "Consumer Sentiment",
                     "Election Year",
                     "Inauguration",
                     "Reagan",
                     "H.W. Bush",
                     "Clinton",
                     "W. Bush",
                     "Lewinsky",
                     "Iran Contra Affair",
                     "Reagan Shot",
                     "Budget Summit",
                     "9/11",
                     "Iran Hostage Crisis",
                     "Libiya Bombing",
                     "China Spy Plane Incident",
                     "Afghan War",
                     "Grenada",
                     "Haiti Invade",
                     "Iraq Invasions",
                     "Persian Gulf War",
                     "Iraqi Freedom",
                     "Iraq Bombing",
                     "Kosovo Invasion",
                     "Panama Invasion",
                     "Somalia",
                     "Intercept")

pan_1

## Bottom Panel

a_n <- a_s$df[2]
s_n <- s_s$df[2]
l_n <- l_s$df[2]
h_n <- h_s$df[2]

bt_app <- Box.test(summary(app_mod)$residuals,48,"Ljung")
aic_app <- AIC(app_mod)
bic_app <- BIC(app_mod)

bt_sanc <- Box.test(summary(sanc_mod)$residuals,48,"Ljung")
aic_sanc <- AIC(sanc_mod)
bic_sanc <- BIC(sanc_mod)

bt_lp <- Box.test(summary(lp_mod)$residuals,48,"Ljung")
aic_lp <- AIC(lp_mod)
bic_lp <- BIC(lp_mod)

bt_hp <- Box.test(summary(hp_mod)$residuals,48,"Ljung")
aic_hp <- AIC(hp_mod)
bic_hp <- BIC(hp_mod)

n_row <- cbind(a_n,s_n,l_n,h_n)
aic_row <- cbind(aic_app, aic_sanc, aic_lp, aic_hp)
bic_row <- cbind(bic_app, bic_sanc, bic_lp, bic_hp)
lb_row <- cbind(bt_app$statistic, bt_sanc$statistic, bt_lp$statistic, bt_hp$statistic)

pan_2 <- round(rbind(n_row,aic_row,bic_row,lb_row),2)
rownames(pan_2) <- c("N",
                     "AIC",
                     "BIC",
                     "LB^{Q}_{48}")
pan_2

# Full Table
pan_1
pan_2


################
###          ###
### Figure 2 ###
###          ###
################

afghanistan.full <- dynlm::dynlm(approval ~ L(approval, 1) + afghanistan +  unem1 + inflation + umics + 
                                   elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                   reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                   persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                   chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

antigua.full <- dynlm::dynlm(approval ~ L(approval, 1) + antigua +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

argentina.full <- dynlm::dynlm(approval ~ L(approval, 1) + argentina +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

australia.full <- dynlm::dynlm(approval ~ L(approval, 1) + australia +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

austria.full <- dynlm::dynlm(approval ~ L(approval, 1) + austria +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

azerbaijan.full <- dynlm::dynlm(approval ~ L(approval, 1) + azerbaijan +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

barbados.full <- dynlm::dynlm(approval ~ L(approval, 1) + barbados +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

belarus.full <- dynlm::dynlm(approval ~ L(approval, 1) + belarus +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

benin.full <- dynlm::dynlm(approval ~ L(approval, 1) + benin +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

bolivia.full <- dynlm::dynlm(approval ~ L(approval, 1) + bolivia +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

belgium.full <- dynlm::dynlm(approval ~ L(approval, 1) + belgium +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

brazil.full <- dynlm::dynlm(approval ~ L(approval, 1) + brazil +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

bulgaria.full <- dynlm::dynlm(approval ~ L(approval, 1) + bulgaria +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

cambodia.full <- dynlm::dynlm(approval ~ L(approval, 1) + cambodia +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

canada.full <- dynlm::dynlm(approval ~ L(approval, 1) + canada +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

car.full <- dynlm::dynlm(approval ~ L(approval, 1) + CAR +  unem1 + inflation + umics + 
                           elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                           reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                           persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                           chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

china.full <- dynlm::dynlm(approval ~ L(approval, 1) + china +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

colombia.full <- dynlm::dynlm(approval ~ L(approval, 1) + colombia +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

congo.full <- dynlm::dynlm(approval ~ L(approval, 1) + congo +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)


costarica.full <- dynlm::dynlm(approval ~ L(approval, 1) + costarica +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

croatia.full <- dynlm::dynlm(approval ~ L(approval, 1) + croatia +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

cuba.full <- dynlm::dynlm(approval ~ L(approval, 1) + cuba +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

cyprus.full <- dynlm::dynlm(approval ~ L(approval, 1) + cyprus +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

drc.full <- dynlm::dynlm(approval ~ L(approval, 1) + DRC +  unem1 + inflation + umics + 
                           elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                           reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                           persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                           chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

dominica.full <- dynlm::dynlm(approval ~ L(approval, 1) + dominica +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

domrep.full <- dynlm::dynlm(approval ~ L(approval, 1) + domrep +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

ecuador.full <- dynlm::dynlm(approval ~ L(approval, 1) + ecuador +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

elsalvador.full <- dynlm::dynlm(approval ~ L(approval, 1) + elsalvador +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

eu.full <- dynlm::dynlm(approval ~ L(approval, 1) + EU +  unem1 + inflation + umics + 
                          elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                          reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                          persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                          chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

egypt.full <- dynlm::dynlm(approval ~ L(approval, 1) + egypt +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

estonia.full <- dynlm::dynlm(approval ~ L(approval, 1) + estonia +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

fiji.full <- dynlm::dynlm(approval ~ L(approval, 1) + fiji +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

finland.full <- dynlm::dynlm(approval ~ L(approval, 1) + finland +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

france.full <- dynlm::dynlm(approval ~ L(approval, 1) + france +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

germany.full <- dynlm::dynlm(approval ~ L(approval, 1) + germany +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

guatemala.full <- dynlm::dynlm(approval ~ L(approval, 1) + guatemala +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

guinea.full <- dynlm::dynlm(approval ~ L(approval, 1) + guinea +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

haiti.full <- dynlm::dynlm(approval ~ L(approval, 1) + haiti +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

honduras.full <- dynlm::dynlm(approval ~ L(approval, 1) + honduras +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

india.full <- dynlm::dynlm(approval ~ L(approval, 1) + india +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

indonesia.full <- dynlm::dynlm(approval ~ L(approval, 1) + indonesia +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

iran.full <- dynlm::dynlm(approval ~ L(approval, 1) + iran +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

iraq.full <- dynlm::dynlm(approval ~ L(approval, 1) + iraq +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

ireland.full <- dynlm::dynlm(approval ~ L(approval, 1) + ireland +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

israel.full <- dynlm::dynlm(approval ~ L(approval, 1) + israel +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

ivorycoast.full <- dynlm::dynlm(approval ~ L(approval, 1) + ivorycoast +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

italy.full <- dynlm::dynlm(approval ~ L(approval, 1) + italy +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

japan.full <- dynlm::dynlm(approval ~ L(approval, 1) + japan +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

kenya.full <- dynlm::dynlm(approval ~ L(approval, 1) + kenya +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

latvia.full <- dynlm::dynlm(approval ~ L(approval, 1) + latvia +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

lebanon.full <- dynlm::dynlm(approval ~ L(approval, 1) + lebanon +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

lesotho.full <- dynlm::dynlm(approval ~ L(approval, 1) + lesotho +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

liberia.full <- dynlm::dynlm(approval ~ L(approval, 1) + liberia +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

lithuania.full <- dynlm::dynlm(approval ~ L(approval, 1) + lithuania +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

malaysia.full <- dynlm::dynlm(approval ~ L(approval, 1) + malaysia +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

mali.full <- dynlm::dynlm(approval ~ L(approval, 1) + mali +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

malawi.full <- dynlm::dynlm(approval ~ L(approval, 1) + malawi +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

malta.full <- dynlm::dynlm(approval ~ L(approval, 1) + malta +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

mexico.full <- dynlm::dynlm(approval ~ L(approval, 1) + mexico +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

myanmar.full <- dynlm::dynlm(approval ~ L(approval, 1) + myanmar +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

namibia.full <- dynlm::dynlm(approval ~ L(approval, 1) + namibia +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

netherlands.full <- dynlm::dynlm(approval ~ L(approval, 1) + netherlands +  unem1 + inflation + umics + 
                                   elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                   reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                   persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                   chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

newzealand.full <- dynlm::dynlm(approval ~ L(approval, 1) + newzealand +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

nicaragua.full <- dynlm::dynlm(approval ~ L(approval, 1) + nicaragua +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

niger.full <- dynlm::dynlm(approval ~ L(approval, 1) + niger +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

nigeria.full <- dynlm::dynlm(approval ~ L(approval, 1) + nigeria +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

northkorea.full <- dynlm::dynlm(approval ~ L(approval, 1) + northkorea +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

northvietnam.full <- dynlm::dynlm(approval ~ L(approval, 1) + northvietnam +  unem1 + inflation + umics + 
                                    elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                    reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                    persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                    chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

pakistan.full <- dynlm::dynlm(approval ~ L(approval, 1) + pakistan +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

panama.full <- dynlm::dynlm(approval ~ L(approval, 1) + panama +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

paraguay.full <- dynlm::dynlm(approval ~ L(approval, 1) + paraguay +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

peru.full <- dynlm::dynlm(approval ~ L(approval, 1) + peru +  unem1 + inflation + umics + 
                            elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                            reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                            persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                            chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

poland.full <- dynlm::dynlm(approval ~ L(approval, 1) + poland +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

romania.full <- dynlm::dynlm(approval ~ L(approval, 1) + romania +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

russia.full <- dynlm::dynlm(approval ~ L(approval, 1) + russia +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

singapore.full <- dynlm::dynlm(approval ~ L(approval, 1) + singapore +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

slovakia.full <- dynlm::dynlm(approval ~ L(approval, 1) + slovakia +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

slovenia.full <- dynlm::dynlm(approval ~ L(approval, 1) + slovenia +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

samoa.full <- dynlm::dynlm(approval ~ L(approval, 1) + samoa +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

southafrica.full <- dynlm::dynlm(approval ~ L(approval, 1) + southafrica +  unem1 + inflation + umics + 
                                   elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                   reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                   persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                   chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

southkorea.full <- dynlm::dynlm(approval ~ L(approval, 1) + southkorea +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

spain.full <- dynlm::dynlm(approval ~ L(approval, 1) + spain +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

svg.full <- dynlm::dynlm(approval ~ L(approval, 1) + svg +  unem1 + inflation + umics + 
                           elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                           reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                           persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                           chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

sweden.full <- dynlm::dynlm(approval ~ L(approval, 1) + sweden +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

syria.full <- dynlm::dynlm(approval ~ L(approval, 1) + syria +  unem1 + inflation + umics + 
                             elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                             reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                             persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                             chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

tanzania.full <- dynlm::dynlm(approval ~ L(approval, 1) + tanzania +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

taiwan.full <- dynlm::dynlm(approval ~ L(approval, 1) + Taiwan +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

thailand.full <- dynlm::dynlm(approval ~ L(approval, 1) + thailand +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

trinto.full <- dynlm::dynlm(approval ~ L(approval, 1) + trinto +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

turkey.full <- dynlm::dynlm(approval ~ L(approval, 1) + turkey +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

uk.full <- dynlm::dynlm(approval ~ L(approval, 1) + uk +  unem1 + inflation + umics + 
                          elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                          reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                          persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                          chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

ukraine.full <- dynlm::dynlm(approval ~ L(approval, 1) + ukraine +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)


uruguay.full <- dynlm::dynlm(approval ~ L(approval, 1) + uruguay +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

vanuatu.full <- dynlm::dynlm(approval ~ L(approval, 1) + vanuatu +  unem1 + inflation + umics + 
                               elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                               reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                               persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                               chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

venezuela.full <- dynlm::dynlm(approval ~ L(approval, 1) + venezuela +  unem1 + inflation + umics + 
                                 elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                 reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                 persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                 chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

northvietnam.full <- dynlm::dynlm(approval ~ L(approval, 1) + northvietnam +  unem1 + inflation + umics + 
                                    elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                    reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                    persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                    chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

yugoslavia.full <- dynlm::dynlm(approval ~ L(approval, 1) + yugoslavia +  unem1 + inflation + umics + 
                                  elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                  reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                  persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                  chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

zambia.full <- dynlm::dynlm(approval ~ L(approval, 1) + zambia +  unem1 + inflation + umics + 
                              elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                              reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                              persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                              chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

zimbabwe.full <- dynlm::dynlm(approval ~ L(approval, 1) + zimbabwe +  unem1 + inflation + umics + 
                                elecyear + inauguration + reagan + bush1 + clinton + bush2 + iranhostage +
                                reaganshot + grenada + libyabomb + irancontra + panamainvade + budgetsummit +
                                persiangulf + somalia + haitiinvade + lewinsky + kosovoinvade + iraqifreedom +
                                chinaspyplane + afghanwar + sep11 + iraqinvade + unscom, data = sanctions)

# Plot 1 (Afghanistan - Malta)
library(coefplot)
#devtools::install_github("jaredlander/coefplot")
country_plot_1 <- coefplot::multiplot(kenya.full,
                                      japan.full,
                                      italy.full,
                                      ivorycoast.full,
                                      israel.full,
                                      ireland.full,
                                      iraq.full,
                                      iran.full,
                                      indonesia.full,
                                      india.full,
                                      honduras.full,
                                      haiti.full,
                                      guinea.full,
                                      guatemala.full,
                                      germany.full,
                                      france.full,
                                      finland.full,
                                      fiji.full,
                                      estonia.full,
                                      egypt.full,
                                      eu.full,
                                      elsalvador.full,
                                      ecuador.full,
                                      domrep.full,
                                      dominica.full,
                                      drc.full,
                                      cyprus.full,
                                      cuba.full,
                                      croatia.full,
                                      costarica.full,
                                      congo.full,
                                      colombia.full,
                                      china.full,
                                      car.full,
                                      canada.full,
                                      cambodia.full,
                                      bulgaria.full,
                                      brazil.full,
                                      benin.full,
                                      belarus.full,
                                      belgium.full,
                                      bolivia.full,
                                      belarus.full,
                                      barbados.full,
                                      azerbaijan.full,
                                      austria.full,
                                      australia.full,
                                      argentina.full,
                                      antigua.full,
                                      afghanistan.full,
                                      coefficients=c("kenya",     
                                                     "japan",
                                                     "italy",
                                                     "ivorycoast",
                                                     "israel",
                                                     "ireland",
                                                     "iraq",
                                                     "iran",
                                                     "indonesia",
                                                     "india",
                                                     "honduras",
                                                     "haiti",
                                                     "guinea",
                                                     "guatemala",
                                                     "germany",
                                                     "france",
                                                     "finland",
                                                     "fiji",
                                                     "estonia",
                                                     "egypt",
                                                     "eu",             
                                                     "elsalvador",
                                                     "ecuador",
                                                     "domrep",
                                                     "dominica",
                                                     "drc",
                                                     "cyprus",
                                                     "cuba",           
                                                     "croatia",
                                                     "costarica",     
                                                     "congo",  
                                                     "colombia",     
                                                     "china",
                                                     "car",             
                                                     "canada",             
                                                     "cambodia", 
                                                     "bulgaria",
                                                     "brazil",
                                                     "benin",
                                                     "belarus",
                                                     "belgium",
                                                     "bolivia",
                                                     "belarus",
                                                     "barbados",
                                                     "azerbaijan",
                                                     "austria",
                                                     "australia",
                                                     "argentina",
                                                     "antigua",
                                                     "afghanistan"),
                                      title = "",
                                      xlab = "",
                                      ylab = "",
                                      innerCI = 2,
                                      lwdInner = .25,
                                      zeroColor = "grey",
                                      zeroLWD = 2,
                                      by="Coefficient",
                                      newNames=c(kenya = "Kenya",
                                                 japan = "Japan",
                                                 italy = "Italy",           
                                                 ivorycoast = "Ivory Coast",
                                                 israel = "Israel",
                                                 ireland = "Ireland",
                                                 iraq = "Iraq",
                                                 iran = "Iran",
                                                 indonesia = "Indonesia",      
                                                 india = "India",
                                                 honduras = "Honduras",     
                                                 haiti = "Haiti",
                                                 guinea = "Guinea",
                                                 guatemala = "Guatemala",
                                                 germany = "Germany",
                                                 france = "France",
                                                 finland = "Finland",
                                                 fiji = "Fiji",
                                                 estonia = "Estonia",
                                                 egypt = "Egypt",           
                                                 eu = "EU",
                                                 elsalvador = "El Salvador",       
                                                 ecuador = "Ecuador",
                                                 domrep = "Dominican Republic",
                                                 dominica = "Dominica",
                                                 drc = "DRC",
                                                 cyprus = "Cyprus",
                                                 cuba = "Cuba",
                                                 croatia = "Croatia",
                                                 costarica = "Costa Rica",
                                                 congo = "Congo", 
                                                 colombia = "Colombia",
                                                 china = "China",
                                                 car = "CAR",     
                                                 canada = "Canada",
                                                 cambodia = "Cambodia",
                                                 bulgaria = "Bulgaria",
                                                 brazil = "Brazil",
                                                 benin = "Benin",
                                                 belarus = "Belarus",
                                                 belgium = "Belgium",
                                                 bolivia = "Bolivia",
                                                 belarus = "Belarus",
                                                 barbados = "Barbados",
                                                 azerbaijan = "Azerbaijan",
                                                 austria = "Austria",
                                                 australia = "Australia",
                                                 argentina = "Argentina",
                                                 antigua = "Antigua",
                                                 afghanistan = "Afghanistan")) + 
  theme(legend.position = "none") + 
  theme(panel.background = element_rect(fill = "white")) +
  theme(axis.text = element_text(colour = "black")) +
  theme(axis.ticks = element_line(color = "black")) +
  geom_vline(xintercept = -15) +
  geom_vline(xintercept = -10) +
  geom_vline(xintercept = -5) +
  geom_vline(xintercept = 5) +
  geom_vline(xintercept = 10) +
  geom_vline(xintercept = 15) + 
  scale_colour_manual(values=c("black", 
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black")) 
country_plot_1 


## Country Plot 2 (Mexico - Zimbabwe)
country_plot_2 <- coefplot::multiplot(zimbabwe.full,
                                      zambia.full,
                                      yugoslavia.full,
                                      venezuela.full,                         
                                      vanuatu.full,
                                      uruguay.full,
                                      ukraine.full,
                                      uk.full,   
                                      turkey.full,
                                      trinto.full,
                                      thailand.full,
                                      tanzania.full,
                                      taiwan.full,
                                      syria.full,
                                      sweden.full,
                                      svg.full,
                                      spain.full,
                                      southkorea.full,
                                      southafrica.full,
                                      slovenia.full,
                                      slovakia.full,
                                      singapore.full,
                                      samoa.full,
                                      russia.full,
                                      romania.full,
                                      poland.full,
                                      peru.full,
                                      paraguay.full,
                                      panama.full,
                                      pakistan.full,
                                      northvietnam.full,
                                      northkorea.full,
                                      nigeria.full,
                                      niger.full,
                                      nicaragua.full,
                                      newzealand.full,
                                      netherlands.full,
                                      namibia.full,
                                      myanmar.full,
                                      mexico.full,
                                      malta.full,
                                      malawi.full,
                                      mali.full,
                                      malaysia.full,
                                      lithuania.full,
                                      liberia.full,
                                      lesotho.full,
                                      lebanon.full,
                                      latvia.full,
                                      coefficients=c("zimbabwe",
                                                     "zambia",
                                                     "yugoslavia",
                                                     "venezuela",
                                                     "vanuatu",
                                                     "uruguay",
                                                     "ukraine",
                                                     "uk.full",
                                                     "turkey",
                                                     "trinto",
                                                     "thailand",
                                                     "tanzania",
                                                     "taiwan",
                                                     "syria",
                                                     "sweden",
                                                     "svg",
                                                     "spain",
                                                     "southkorea",
                                                     "southafrica",
                                                     "slovenia",
                                                     "slovakia",
                                                     "singapore",
                                                     "samoa",
                                                     "russia",
                                                     "romania",
                                                     "poland",
                                                     "peru",
                                                     "paraguay",
                                                     "panama",
                                                     "pakistan",
                                                     "northvietnam",
                                                     "northkorea",
                                                     "nigeria",
                                                     "niger",
                                                     "nicaragua",
                                                     "newzealand",
                                                     "netherlands",
                                                     "namibia",
                                                     "myanmar",
                                                     "mexico",
                                                     "malta",
                                                     "malawi",
                                                     "mali",
                                                     "malaysia",
                                                     "lithuania",
                                                     "liberia",             
                                                     "lesotho",   
                                                     "lebanon",    
                                                     "latvia"),
                                      title = "",
                                      xlab = "",
                                      ylab = "",
                                      innerCI = 2,
                                      lwdInner = .25,
                                      zeroColor = "grey",
                                      zeroLWD = 2,
                                      by="Coefficient",
                                      newNames=c(zimbabwe = "Zimbabwe",
                                                 zambia = "Zambia",
                                                 yugoslavia = "Yugoslavia",
                                                 venezuela = "Venezuela",                         
                                                 vanuatu = "Vanuatu",
                                                 uruguay = "Uruguay",
                                                 ukraine = "Ukraine",
                                                 uk = "UK",   
                                                 turkey = "Turkey",
                                                 trinto = "Trinidad & Tobago",
                                                 thailand = "Thailand",
                                                 tanzania = "Tanzania",
                                                 taiwan = "Taiwan",
                                                 syria = "Syria",
                                                 sweden = "Sweden",
                                                 svg = "St. Vincent",
                                                 spain = "Spain",
                                                 southkorea = "South Korea",
                                                 southafrica = "South Africa",
                                                 slovenia = "Slovenia",
                                                 slovakia = "Slovakia",
                                                 singapore = "Singapore",
                                                 samoa = "Samoa",
                                                 russia = "Russia",
                                                 romania = "Romania",
                                                 poland = "Poland",
                                                 peru = "Peru",
                                                 paraguay = "Paraguay",
                                                 panama = "Panama",
                                                 pakistan = "Pakistan",
                                                 northvietnam = "North Vietnam",
                                                 northkorea = "North Korea",
                                                 nigeria = "Nigeria",
                                                 niger = "Niger",
                                                 nicaragua = "Nicaragua",
                                                 newzealand = "New Zealand",
                                                 netherlands = "Netherlands",
                                                 namibia = "Namibia",
                                                 myanmar = "Myanmar",
                                                 mexico = "Mexico",
                                                 malta = "Malta",
                                                 malawi = "Malawi",
                                                 mali = "Mali",
                                                 malaysia = "Malaysia",
                                                 lithuania = "Lithuania",
                                                 liberia = "Liberia",           
                                                 lesotho = "Lesotho",
                                                 lebanon = "Lebanon",
                                                 latvia = "Latvia")) + 
  theme(legend.position = "none") + 
  theme(panel.background = element_rect(fill = "white")) +
  theme(axis.text = element_text(colour = "black")) +
  theme(axis.ticks = element_line(color = "black")) +
  geom_vline(xintercept = -15) +
  geom_vline(xintercept = -10) +
  geom_vline(xintercept = -5) +
  geom_vline(xintercept = 5) +
  geom_vline(xintercept = 10) +
  geom_vline(xintercept = 15) + 
  scale_colour_manual(values=c("black", 
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black", 
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black",
                               "black")) 
country_plot_2

# Final Plots
country_plot_1
country_plot_2

